{layout name="formlayout" /}
<div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin" style="padding: 20px;">
    <div class="layui-form-item">
        <label class="layui-form-label">上级分类</label>
        <div class="layui-input-block">
           <select name="pid">
               <option value=""></option>
               {volist name="cates" id="val"}
               <option value="{$val.id}">{$val.name}</option>
               {/volist}
           </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">分类名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" value="{$item.name}" lay-verify="required" placeholder="请输入分类名称"
                autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            <input type="text" name="order" value="{$item.order|default=100}" lay-verify="required" placeholder="请输入昵称"
                autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="hidden" name="id" value="{$item.id}">
        <input type="button" lay-submit lay-filter="zbc-product-cate-submit" id="zbc-product-cate-submit" value="确认">
    </div>
</div>
<script>
    layui.config({
        base: '/static/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form'], function () {
        var $ = layui.$
            , form = layui.form;
    })
</script>